#ifndef MATRIX_H
#define MATRIX_H

#include "MyGL.h"
#include "Vec3.h"
#include "Vec4.h"
#include "Quaternion.h"

namespace Engine
{
	class Matrix
	{
		private:
			float m_matrix[16];

		public:
			void SetToIdentity();
			Matrix();
			Matrix(const Quaternion& rhs);
			Matrix& operator =(const Quaternion& rhs);

			Matrix& operator *=(const Matrix& rhs);
			Matrix operator *(const Matrix& rhs) const;
			Matrix& operator *=(const float* f);
			Matrix operator *(const float* f) const;
			Vec3 operator *(const Vec3& vec) const;
			Vec4 operator *(const Vec4& vec) const;

			void SetTranslation(const Vec3& vec);
			void SetRotationX(float x);
			void SetRotationY(float y);
			void SetRotationZ(float z);
			void SetScale(const Vec3& vec);
			void SetToProjectionMatrix();
			void SetToModelViewMatrix();

			float& operator[](unsigned int n);

			const float* ToArray() const {return m_matrix;}
	};
}

#endif